package com.kuzan.autocloud.common.model.business;

import com.kuzan.autocloud.common.SelectItems;
import com.kuzan.autocloud.common.model.Base;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>Description: </p>
 *
 * @author kuzank
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "sys_business")
public class Business extends Base {

    @Column(length = 32)
    private String groupobj;

    public static Business of(String title, String id) {
        Business obj = new Business();
        obj.setTitle(title);
        obj.setId(id);
        obj.setGroupobj(SelectItems.SystemGrup.System.value());
        obj.setSort(getSortIncrement());
        return obj;
    }
}
